<?php

session_start();
include './function/Testimoni.php';
$testimoni = $_POST['testimoni'];
$id_pengguna = $_POST['id_pengguna'];
$testimoni1 = new Testimoni();
$testimoni1->setTestimoni($testimoni);
$testimoni1->setId_Pengguna($id_pengguna);
if ($testimoni == '') {
    $_SESSION['testi'] = 'tuliskan testimoni anda';
} else {
    if ($testimoni1->simpanTestimony() != 'success') {
        $_SESSION['testi'] = 'testimoni tidak tersimpan';
    }
}
if (isset($_SESSION['testi'])) {
    header("Location: pageUser.php");
    exit();
} else {
    header("Location: pageUser.php");
    $_SESSION['testi'] = 'testimoni tersimpan';
    exit();
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

